package com.boxuegu.entry;

import com.boxuegu.controller.CardController;
import com.boxuegu.controller.LineController;
import com.boxuegu.dao.CardDao;

import java.io.IOException;
import java.util.Scanner;

public class MetroLineSystemEntry {
    public static void main(String[] args) throws IOException {

        Scanner sc = new Scanner(System.in);
        while(true) {
            System.out.println("--------------欢迎乘坐北京地铁--------------");
            System.out.println("请输入您的选择：1.乘坐地铁     2.办理地铁卡   3.充值地铁卡    4.退出系统");
            String choice = sc.next();
            switch (choice){
                case "1":
                    //System.out.println("乘坐地铁");
                    LineController lineController = new LineController();
                    lineController.start();
                    break;
                case "2":
                    //办理地铁卡
                    System.out.println("办理地铁卡");
                    //开启办理地铁卡页面
                    CardController cardController = new CardController();
                    cardController.start();
                    
                    break;
                case "3":
                    //System.out.println("充值地铁卡");
                    cardController = new CardController();
                    cardController.rechargeCard();
                    break;
                case "4":
                    System.exit(0);//退出Java虚拟机
                    break;
                default:
                    System.out.println("您的输入有误, 请重新输入。");
            }

        }
    }
}
